# alg.py
from typing import List

def can_jump(nums: List[int]) -> bool:
    """
    判断是否能跳到最后一个位置
    :param nums: 跳跃数组
    :return: 是否可达终点
    """
    rightmost = 0
    for i in range(len(nums)):
        if i <= rightmost:
            rightmost = max(rightmost, i + nums[i])
            if rightmost >= len(nums) - 1:
                return True
    return False
